<!--
 * @Description: 
 * @Autor: 商晓彬
 * @Date: 2021-06-23 12:09:31
 * @LastEditors: 商晓彬
 * @LastEditTime: 2022-09-12 11:47:07
-->
<div bsModal #createOrEditModal="bs-modal" (onShown)="onShown()" class="look modal fade" tabindex="-1" role="dialog"
    aria-labelledby="createOrEditModal" aria-hidden="true" [config]="{backdrop: 'static', keyboard: !saving}">
    <div style="width:1880px!important;margin: 1.75rem auto;">
        <div class="modal-content">
            <form *ngIf="active" #bopForm="ngForm" novalidate autocomplete="off">
                <div class="modal-header">
                    <h4 class="modal-title">
                        <span>导出资料包</span>
                    </h4>
                    <button type="button" class="close" (click)="close()" [attr.aria-label]="l('Close')"
                        [disabled]="saving">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <div class="modal-body">
                    <div class="m-content">
                        <div class="row">
                            <div class="col-lg-4" style="height: 740px!important; overflow: auto;">
                                <span class="title">Bop信息</span>
                                <div class="m-content">
                                    <div class="m-portlet m-portlet--mobile">
                                        <div class="m-portlet__body">
                                            <div class="row align-items-center">
                                                <div class="primeng-datatable-container">
                                                    <div class="col-md-12" style="
                                                                            float: left;
                                                                            height: 600px;
                                                       ">
                                                        <p-tree [value]="files2" selectionMode="single"
                                                            [(selection)]="selectedFiles"
                                                            (onNodeSelect)="nodeSelect($event)"
                                                            [style]="{ height: '90%' }" [loading]="loadingtree">
                                                            <ng-template let-node pTemplate="default">
                                                                <img class="imgcontent"
                                                                    src="../../../assets/common/images/三级图标.png"
                                                                    *ngIf="node.nodeLevel==8||node.nodeLevel==9"
                                                                    width="20" height="20" />
                                                                <img class="imgcontent"
                                                                    src="../../../assets/common/images/0.png"
                                                                    *ngIf="node.nodeLevel==undefind" width="20"
                                                                    height="20" />
                                                                <img class="imgcontent"
                                                                    src="../../../assets/common/images/1.png"
                                                                    *ngIf="node.nodeLevel==1" width="20" height="20" />
                                                                <img class="imgcontent"
                                                                    src="../../../assets/common/images/2.png"
                                                                    *ngIf="node.nodeLevel==2" width="20" height="20" />
                                                                <img class="imgcontent"
                                                                    src="../../../assets/common/images/3.png"
                                                                    *ngIf="node.nodeLevel==3" width="20" height="20" />
                                                                <img class="imgcontent"
                                                                    src="../../../assets/common/images/4.png"
                                                                    *ngIf="node.nodeLevel==4" width="20" height="20" />
                                                                <img class="imgcontent"
                                                                    src="../../../assets/common/images/5.png"
                                                                    *ngIf="node.nodeLevel==5" width="20" height="20" />
                                                                <span
                                                                    *ngIf="node.key==-1">{{node.model}}-{{node.lotNo}}-{{node.nodeDrawingNo}}-{{node.nodeName}}-{{node.stageSign}}</span>
                                                                <span
                                                                    *ngIf="node.key!=-1">{{node.nodeDrawingNo}}-{{node.nodeName}}</span>
                                                                <span class="ptagisRelation"
                                                                    *ngIf="node.isRelation==1&&node.isExport!=1">{{node.isRelation==1?'已关联':''}}</span>
                                                                <span class="ptagisExport"
                                                                    *ngIf="node.isExport==1">{{node.isExport==1?'已导出':''}}</span>
                                                            </ng-template>
                                                        </p-tree>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="col-lg-8" style="height: 740px!important;">
                                <div class="row align-items-center" style="margin-top: 25px;">
                                    <div class="primeng-datatable-container">
                                        <div class="form-group" style="display: flex;">
                                            <label for="materialCode"
                                                style="margin-top: 7px;margin-left: 40px;">规程图号：</label>
                                            <input style="width: 150px;margin-left: 10px;" id="materialCode" type="text"
                                                name="materialCode" class="form-control" [(ngModel)]="materialCode"
                                                maxlength="256" />
                                            <label for="materialname"
                                                style="margin-top: 7px;margin-left: 50px;">规程名称：</label>
                                            <input style="width: 150px;margin-left: 10px;" id="materialname" type="text"
                                                name="materialname" class="form-control" [(ngModel)]="materialname"
                                                maxlength="256" />
                                            <label for="propty" style="margin-top: 7px;margin-left: 50px;">属性：</label>
                                            <p-dropdown name="propty" [options]="proptyList" [(ngModel)]="propty"
                                                placeholder="请选择">
                                            </p-dropdown>
                                            <button style="margin-left: 20px;" pButton type="button" label="查询"
                                                (click)="getTable()"></button>
                                            <button style="margin-left: 20px;" pButton type="button" label="重置"
                                                (click)="resert()"></button>
                                            <button style="margin-left: 200px;" pButton type="button" label="导出"
                                                (click)="export()"></button>
                                        </div>
                                        <p-table [value]="files1" [paginator]="false" [scrollable]="true"
                                            ScrollWidth="100%" [(selection)]="selectRow">
                                            <ng-template pTemplate="header" selectionMode="multiple">
                                                <tr>
                                                    <th style="width: 50px">
                                                        <p-tableHeaderCheckbox></p-tableHeaderCheckbox>
                                                    </th>
                                                    <th style="width: 50px">序号</th>
                                                    <th style="width: 300px">文件编号</th>
                                                    <th style="width: 300px">名称</th>
                                                    <!-- <th style="width: 150px">版本</th> -->
                                                    <!-- <th style="width: 150px">变更状态</th>
                                                    <th style="width: 150px">属性</th> -->
                                                </tr>
                                            </ng-template>
                                            <ng-template pTemplate="body" let-record="$implicit"
                                                let-rowIndex="rowIndex">
                                                <tr>
                                                    <td style="width: 50px">
                                                        <p-tableCheckbox [value]="record"></p-tableCheckbox>
                                                    </td>
                                                    <td style="width: 50px">{{rowIndex+1}}</td>
                                                    <td style="width: 300px">{{record.techniqueNumber}}</td>
                                                    <td style="width: 300px">{{record.techniqueName}}</td>
                                                    <!-- <td style="width: 150px">{{record.edition}}</td> -->
                                                    <!-- <td style="width: 150px">{{record.fileStatusDesc}}</td>
                                                    <td style="width: 150px">{{record.planExprot? '已导出':'未导出'}}</td> -->
                                                </tr>
                                            </ng-template>
                                        </p-table>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>

                </div>
            </form>
        </div>
    </div>
</div>